﻿using Holoville.HOTween;
using Holoville.HOTween.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;


public class AtweenScale : Atween
{ 
    public Tweener to(GameObject target, float duration, float vx, float vy, EaseType easeType = EaseType.Linear, float delay = 0, TweenDelegate.TweenCallbackWParms callback = null, object[] para = null, bool isFrom = false)
    {
        Tweener t;
        TweenParms p = new TweenParms();
        p.Prop("localScale", new Vector3(vx, vy, vy));
        p.Ease(easeType);
        if (delay > 0)
        {
            p.Delay(delay);
        }
        //
        if (callback != null)
        {
            p.OnComplete(callback, para);
        }
        t = HOTween.To(target.transform, duration, p);
        return t;
    }
}
